package com.piggy.logi.sys.enums;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 计费方式枚举
 */
@Getter
@AllArgsConstructor
public enum FeeTypeEnum {

    MILEAGE("mileage", "按里程"),

    WEIGHT("weight", "按重量"),

    VOLUME("volume", "按体积"),

    PIECES("pieces", "按件数"),

    VOLUMEWEIGHT("volumeWeight", "体积重量"),

    WEIGHTMULTIMILEAGE("weightMultiMileage", "重量*里程"),

    ;

    private final String type;

    private final String info;

    public static boolean isMileage(String type) {
        return StrUtil.equals(MILEAGE.type, type);
    }

    public static boolean isWeight(String type) {
        return StrUtil.equals(WEIGHT.type, type);
    }

    public static boolean isVolume(String type) {
        return StrUtil.equals(VOLUME.type, type);
    }

    public static boolean isVolumeWeight(String type) {
        return StrUtil.equals(VOLUMEWEIGHT.type, type);
    }

    public static boolean isWeightMultiMileage(String type) {
        return StrUtil.equals(WEIGHTMULTIMILEAGE.type, type);
    }

}
